Home > Use Cases > Retrieving Operation History

Retrieving Operation History

A sample SessionToken will be used throughout this use case.
The sample SessionToken will be: e65aedeb-a0e7-440c-8309-1cc0bcd920db

Reports can be retrieved for local backups, offsite copies and restores. The default behaviour when retrieving a report is to retrieve the last operation. Irrelevant whether it was a successful or a failed operation. More parameters can be specified to retrieve more specific information, such as retrieving more than 1 item, retrieving only successful or failed items. A date range can also be provided, which would return data which falls between two specific dates.

The following examples illustrate how to retrieve such information for backups, but the same API calls for offsite copies and restores are also available. The only parameter which must be retrieved from another call is the AltaroVirtualMachineRef. Its retrieval has been thoroughly explained further above.

 

GET request to retrieve last backup operation, irrelevant of its result:

http://localhost:35113/api/reports/backup/e65aedeb-a0e7-440c-8309-1cc0bcd920db/ba2e9cdc-0d85-48e6-8db7-a45c5a40819e

 

GET request to retrieve last successful backup operation:

http://localhost:35113/api/reports/backup/e65aedeb-a0e7-440c-8309-1cc0bcd920db/ba2e9cdc-0d85-48e6-8db7-a45c5a40819e/1

 

GET request to retrieve last failed backup operation:

http://localhost:35113/api/reports/backup/e65aedeb-a0e7-440c-8309-1cc0bcd920db/ba2e9cdc-0d85-48e6-8db7-a45c5a40819e/2

 

GET request to retrieve last 5 successful backup operations:

http://localhost:35113/api/reports/backup/e65aedeb-a0e7-440c-8309-1cc0bcd920db/ba2e9cdc-0d85-48e6-8db7-a45c5a40819e/1/5

 

GET request to retrieve last 5 failed backup operations:

http://localhost:35113/api/reports/backup/e65aedeb-a0e7-440c-8309-1cc0bcd920db/ba2e9cdc-0d85-48e6-8db7-a45c5a40819e/2/5

 

GET request to retrieve last 10 backup operations between 01/10/2015 till 31/10/2015, irrelevant of their result:

http://localhost:35113/api/reports/backup/e65aedeb-a0e7-440c-8309-1cc0bcd920db/ba2e9cdc-0d85-48e6-8db7-a45c5a40819e/0/10/2015-10-01-00-00-00/2015-10-31-23-59-59

 

GET request to retrieve all erroneous backup operations between 01/10/2015 till 31/10/2015, irrelevant of their result, assuming that less than 1000 backups have been taken between these dates:

http://localhost:35113/api/reports/backup/e65aedeb-a0e7-440c-8309-1cc0bcd920db/ba2e9cdc-0d85-48e6-8db7-a45c5a40819e/2/1000/2015-10-01-00-00-00/2015-10-31-23-59-59

 

Note: A full list of available API commands can be found here